import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class LoginForm extends StatefulWidget {
  @override
  _LoginFormState createState() => _LoginFormState();
}

class _LoginFormState extends State<LoginForm> {
  @override
  Widget build(BuildContext context) {
    return Container(
      
      width: double.infinity,
      height: ScreenUtil.getInstance().setHeight(500),
      decoration: BoxDecoration(
          color: Colors.white.withOpacity(0.9),
          borderRadius: BorderRadius.circular(8.0),
          boxShadow: [
            BoxShadow(
                color: Colors.black12,
                offset: Offset(0, 15),
                blurRadius: 15.0),
            BoxShadow(
                color: Colors.black12,
                offset: Offset(0, -10),
                blurRadius: 15.0)
          ]),
      child: Padding(
        padding: const EdgeInsets.only(
            left: 16.0, right: 16.0, top: 16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Text('登录',style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(45)
            ),),
            SizedBox(
              height: ScreenUtil.getInstance().setHeight(30),
            ),
            Text("用户名",style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(26)
            ),),
            TextField(
              decoration: InputDecoration(
                  hintText: "用户名称必须输入",
                  hintStyle: TextStyle(
                      color: Colors.grey,fontSize: 12.0)
              ),
            ),
            SizedBox(
              height: ScreenUtil.getInstance().setHeight(15),
            ),
            Text("密码",style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(26)
            ),),
            TextField(
              obscureText:true,
              decoration: InputDecoration(
                  hintText: "用户名称必须输入",
                  hintStyle: TextStyle(
                      color: Colors.grey,fontSize: 12.0)
              ),

            ),
            SizedBox(
              height: ScreenUtil.getInstance().setHeight(35),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: <Widget>[
                Text('忘记密码？',style: TextStyle(color: Colors.blueAccent),)
              ],
            )
          ],
        ),
      ),
    );
  }
}
